import request from "./request";

export const getMenus = () => request({
    method:'get',
    url:'/menus',
})

export const addMenus = (data) => request({
    method:'post',
    url:'/menus',
    data
})



export const delMenus = (id) => request({
    method:'delete',
    url:`/menus/${id}`,
})

export const getMenu = (id) => request({
    method:'get',
    url:`/menus/${id}`,
})

export const editMenus = (id,data) => request({
    method:'put',
    url:`/menus/${id}`,
    data,
})

// export const exist = (params) => request({
//     method:'get',
//     url:'/menus/exist',
//     params,
// })